{include file="header_ajax.tpl" title=$title}

<h2>{$title}</h2>

<div class="box">
<h4>Offers</h4>
Data <strong>{$dataO->CNT}</strong> entries ranges from <strong>{$dataO->MINDATE}</strong> to <strong>{$dataO->MAXDATE}</strong><br>
Total Sum: <strong>{$dataO->SUMM}</strong> Bucks
<h4>Invoices</h4>
Data <strong>{$dataI->CNT}</strong> entries ranges from <strong>{$dataI->MINDATE}</strong> to <strong>{$dataI->MAXDATE}</strong><br>
Total Sum: <strong>{$dataI->SUMM}</strong> Bucks
</div>




<div class="box">
<form method="post" action="report.php">
<table class="righter">
<tr><td>From Date</td><td><input type="text" name="from" value="{$minMaxDates->MINDATE}"></td>
<td>To Date</td><td><input type="text" name="to" value="{$minMaxDates->MAXDATE}"></td>
<td>Type</td><td><select name="type"><option value="%">Both</option><option value="O">Quotations</option><option value="I">Invoices</option></select></tr>
<tr><td>Customer</td><td><select name="customer[]" multiple size="5"><option value="%" selected>All</option>{foreach from=$customers key=k item=v}<option value="{$v->ID}">{$v->FAMILYNAME}, {$v->FIRSTNAME} ({$v->CITY})</option>{/foreach}</select>
<td>Work Items</td><td><select name="works[]" multiple size="5"><option value="%" selected>All</option>{foreach from=$workItems key=k item=v}<option value="{$v->ID}">{$v->WORK_TEXT}</option>{/foreach}</select>
<td colspan="2"><input type="submit" value="generate report"></td></tr>
</table>

</form>
</div>

{include file="footer.tpl"}
